#!/bin/sh

# mkdir /var/log/aria2
if [ ! -e "/data/log" ];then
        mkdir -p /data/log
fi
if [ ! -e "/data/down" ];then
        mkdir -p /data/down
fi
if [ ! -e "/data/dht" ];then
        mkdir -p /data/dht
        touch /data/dht/dht.dat
        chmod +r /data/dht/dht.dat
fi
if [ ! -e "/data/aria2.session" ];then
        touch /data/aria2.session
fi
aria2c --conf-path /conf/aria2.conf > /data/log/aria2_$(date "+%Y%m%d").log 2>&1 & 

/usr/local/nginx/sbin/nginx
